﻿module BrowserJsEngine

open Dom
open JsEngine
open JsTypes
open HostObjectReflection
open DocumentHost

(*
    Create a JS engine with host objects provided by the browser
*) 

let createBrowserJsEngine (doc:Document) (window:IWindow) =
    let hostObjects = [
        ("window", Object(HostObjectWrapper(window)))
        ("document", Object(HostObjectWrapper(doc)))        
    ]
    JsEngine(hostObjects)